package com.eric.demo.metric;

import com.codahale.metrics.Counter;
import com.codahale.metrics.MetricRegistry;

/**
 * @author ZhangGuangyin on 2018/8/9
 */
public class MetricTest {

    public static void main(String[] argvs){

        MetricRegistry registry = new MetricRegistry();

        Counter counter = registry.counter("receive");

        for(int i=0;i<10;i++){
            counter.inc();
        }
        System.out.println("receive:" + counter.getCount());

    }
}
